<template>
	<view class="selectCell">
		<!-- 选择小区 -->
		<view class="search">
			<input class="input1" confirm-type="search" placeholder="请输入" />
			<text class="iconfont icon-sousuo"></text>
		</view>
		<view class="content">
			<view  @click="passMsg(v.cellName,v.id)"  hover-class="navigator-hover" open-type="navigateBack"  v-for="v in celldata" :key="v.id">
				<view class="item">
					<text>{{v.cellName}}</text>
					<text class="iconfont icon-you"></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		http
	} from "../../../../utils/http.js"
	export default {
		data() {
			return {
				celldata: [],
			};
		},
		methods: {
			getDate() {
				http({
					url: "/basicInformation/list",
					method: "get"
				}).then(({
					data
				}) => {
					this.celldata = data.list
					console.log(this.celldata,"8888888888")
				})
			},
			// 传参
			passMsg(v,e){
				let callname={
					id:e,
					name:v
				}
				let callnamestr=JSON.stringify(callname)
				uni.navigateTo({
					url: '../addHouse?cellName='+callnamestr
				});
			
			}
		},

		onLoad() {
			this.getDate()
		}
	}
</script>

<style lang="less">
	@import url("../../../../static/font/iconfont.css");

	.selectCell {
		.search {
			height: 170rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 0 26rpx;
			position: relative;

			.input1 {
				width: 688rpx;
				height: 90rpx;
				padding: 0 30rpx;
				background-color: #efefef;
				border-radius: 60rpx;
			}

			text {
				font-size: 45rpx;
				position: absolute;
				top: 62rpx;
				right: 62rpx;
			}
		}

		.content {
			padding: 0 38rpx;

			.item {
				display: flex;
				padding: 38rpx 0;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1px solid #eee;

				text:nth-child(2) {
					color: #ccc;
				}
			}
		}
	}
</style>
